package com.dianping.cat.core.dal;

import java.util.List;
import org.unidal.dal.jdbc.AbstractDao;
import org.unidal.dal.jdbc.DalException;
import org.unidal.dal.jdbc.Readset;
import org.unidal.dal.jdbc.Updateset;

public class HostinfoDao
  extends AbstractDao {
/* 11 */   public Hostinfo createLocal() { return new Hostinfo(); }





/* 17 */   public int deleteByPK(Hostinfo proto) throws DalException { return getQueryEngine().deleteSingle(HostinfoEntity.DELETE_BY_PK, proto); }



  
  public List<Hostinfo> findAllIp(Readset<Hostinfo> readset) throws DalException {
/* 23 */     Hostinfo proto = new Hostinfo();

/* 25 */     return getQueryEngine().queryMultiple(HostinfoEntity.FIND_ALL_IP, proto, readset);
  }





  
  public Hostinfo findByPK(int keyId, Readset<Hostinfo> readset) throws DalException {
/* 34 */     Hostinfo proto = new Hostinfo();

/* 36 */     proto.setKeyId(keyId);

/* 38 */     return (Hostinfo)getQueryEngine().querySingle(HostinfoEntity.FIND_BY_PK, proto, readset);
  }





  
  public Hostinfo findByIp(String ip, Readset<Hostinfo> readset) throws DalException {
/* 47 */     Hostinfo proto = new Hostinfo();

/* 49 */     proto.setIp(ip);

/* 51 */     return (Hostinfo)getQueryEngine().querySingle(HostinfoEntity.FIND_BY_IP, proto, readset);
  }







  
/* 61 */   protected Class<?>[] getEntityClasses() { return new Class[] { HostinfoEntity.class }; }



/* 65 */   public int insert(Hostinfo proto) throws DalException { return getQueryEngine().insertSingle(HostinfoEntity.INSERT, proto); }





/* 71 */   public int updateByPK(Hostinfo proto, Updateset<Hostinfo> updateset) throws DalException { return getQueryEngine().updateSingle(HostinfoEntity.UPDATE_BY_PK, proto, updateset); }
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/lib/cat-core-3.0.0.jar!/com/dianping/cat/core/dal/HostinfoDao.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */